#! /usr/bin/env octave -q
train=importdata('../data/mine/random_liner.csv', ',')
sample_size = size(train,1)
x=train(:,1)
y=train(:,2)
ex=[ones(sample_size,1),x]
#ang=(x'*x)^-1*x'*y
ang=(ex'*ex)^-1*ex'*y
ang=ang'
base=[0,300]'
base_size=size(base); pt=[ones(base_size, 1),base]
target=ang*pt'


#y = a1 +a2*x
plot(x,y,'*', base, target)
pause
